Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Building a TreeView window
Building a dynamic TreeView is basically a two-step process. First, you must define the nodes of the TreeView, the different levels within the tree. Each of these nodes determines the data displayed at that level and its relationship to the level above. Then you define a TreeView window itself, which can incorporate any number of nodes to form a multi-level tree.
Before you define tree nodes, you must make sure that the objects referenced in the node definitions are already defined and registered in the Repository. This includes SDOs or SBOs that will provide data for the nodes, and container windows that will be displayed in the right-side pane when data nodes in the TreeView are selected.
As an example, you are going to build a TreeView window with three levels of data from the Sports2000 database: Departments, Employees in each Department, and Family members for each Employee.
![]()
To complete the preliminary steps:
- Run Entity Import to import table and field definitions for the tables involved.
Note: If you have worked through OpenEdge Development: Progress Dynamics Getting Started , you have already done this.- Place these definitions into a new Employee (EMP) product module, so that they are grouped together and easy to locate.
- Run the Object Generator to create SDOs, dynamic browsers, and viewers for these tables.
For this example, you will not be using browsers. You will use viewers to provide more exact control over the viewer layout, but the browsers and viewers generated for you will still be useful in other windows.
- Build a static SmartDataViewer in the AppBuilder for each of the
Department,Employee, andFamilySDOs.- In the Container Builder, create windows where the
Department,Employee, andFamilyrecords can be maintained. For each of the three tables, follow these steps:
- In the AppBuilder, select New
Dependent Window (DynFold). The Container Builder appears.
- Enter a name for the container. (For this example, use the table name, or dump name if that is shorter, plus
foldwin).- Select rywinFolder as the container template. (Create from existing container.)
- Enter a Description and add the WindowName in the property sheet.
- Select Page 1.
- Select the Pages tool and set the Page Label to an appropriate name, then choose Save and exit from the Pages tool.
- On the Object Instances section, choose the lookup on the Object field to select a viewer to replace the template viewer.
- In the lookup window, select the viewer you created for the table.
- Choose the Save button and exit the Container Builder window.
When you have finished all the preliminary steps, you can then proceed to define the tree nodes and the TreeView window itself, as described in the "Defining TreeView nodes" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |